#ifndef LIBACCENT_ALGORITHMS_ANY_OF_HPP
#define LIBACCENT_ALGORITHMS_ANY_OF_HPP

#include "accent/algorithms/fold.hpp"
#include "accent/algorithms/map.hpp"
#include <functional>

namespace accent
{
  template <typename SinglePassRange, typename Predicate>
  bool any_of(SinglePassRange range, Predicate predicate)
  {
    return fold_left(false, map(range, predicate),
      std::logical_or<bool>(), std::logical_not<bool>());
  }
}

#endif
